﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jim.Core;

public interface ISdkResponse
{
    string Code { get; set; }
    string Message { get; set; }
    bool IsSuccess { get; }
}

/// <summary>
/// 通用返回对象
/// </summary>
public class SdkResponse : ISdkResponse
{
    public string Code { get; set; } = "200";
    public string Message { get; set; } = "";
    public bool IsSuccess => Code == "200";
}

/// <summary>
/// 泛型返回对象
/// </summary>
/// <typeparam name="T"></typeparam>
public class SdkResponse<T> : SdkResponse
{
    public T Result { get; set; }
}